//
//  YJCalenderCollectionViewCell.m
//  Orthopeddic
//
//  Created by apple on 16/4/22.
//  Copyright © 2016年 杨江. All rights reserved.
//

#import "YJCalenderCollectionViewCell.h"
#import "Changed.h"
@implementation YJCalenderCollectionViewCell

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self initalizeView];
    }
    return self;
}


- (void)initalizeView{

    

}
-(void)setSelected:(BOOL)selected{
        if(selected){
            _dateLabel.layer.backgroundColor=[UIColor orangeColor].CGColor;
            _dateLabel.textColor = [UIColor whiteColor];
        }
        else{
            _dateLabel.layer.backgroundColor=[UIColor clearColor].CGColor;
            
            
    }
    
}

#pragma mark -- Getter

- (UILabel *)dateLabel{
    if (!_dateLabel) {
        _dateLabel = [[UILabel alloc]initWithFrame:CRM(0, 0, 30*PROPORTION_W, 30*PROPORTION_W)];
         _dateLabel.center = self.center;
        _dateLabel.textAlignment = NSTextAlignmentCenter;
//        _dateLabel.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.dateLabel];
    }
    return _dateLabel;
}

- (UIView *)bgView{
    if (!_bgView) {
        _bgView = [[UIView alloc]initWithFrame:CRM(0, 0, 30*PROPORTION_W, 30*PROPORTION_W)];
        _bgView.center = self.center;
        _bgView.backgroundColor = [UIColor orangeColor];
        _bgView.layer.cornerRadius = 15*PROPORTION_W;
//        _bgView.hidden = YES;
//        [self.contentView addSubview:self.bgView];
    }

   return _bgView;
}

@end
